package com.radiation.rms.controller;


import com.radiation.rms.common.R;
import com.radiation.rms.entity.RealTimeData;
import com.radiation.rms.service.RealTimeDataService;
import com.radiation.rms.vo.RealDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 实时数据表 前端控制器
 * </p>
 *
 * @author 1062
 * @since 2021-04-02
 */
@RestController
@RequestMapping("/rms/data/real")
public class RealTimeDataController {
    @Autowired
    private RealTimeDataService realTimeDataService;

    @PostMapping("get")
    public R getRealTime(@RequestBody RealDataVo realDataVo) {
        return realTimeDataService.getRealTime(realDataVo);
    }

    @PostMapping("chart")
    public R showChart(@RequestBody RealDataVo realDataVo) {
        return realTimeDataService.showChart(realDataVo);
    }
    @PostMapping("save")
    public R saveReal(@RequestBody RealTimeData realTimeData) {
        return realTimeDataService.saveReal(realTimeData);
    }
}

